<template>
  <div id="app">
    <el-container style="height: 100%">
      <el-aside width="auto" class="hidden-md-and-up"
        ><AsideNav v-model="activeIndex"
      /></el-aside>
      <el-container>
        <el-header class="hidden-md-and-up">
          <div class="aside-header">
            <span class="app-name">{{ app_name }}</span>
          </div>
        </el-header>
        <el-header class="hidden-sm-and-down">
          <HeaderNav v-model="activeIndex" />
        </el-header>
        <el-main class="main-content">
          <router-view />
        </el-main>
        <el-footer></el-footer>
      </el-container>
    </el-container>
  </div>
</template>
<script>
import HeaderNav from "@/components/HeaderNav";
import AsideNav from "@/components/AsideNav";
export default {
  components: {
    HeaderNav,
    AsideNav,
  },
  data() {
    return {
      app_name: "二币交易所",
      activeIndex: this.$router.history.current.name,
    };
  },
};
</script>

<style>
html {
  font-size: 16px;
  user-select: none;
}
@media screen and (min-width: 480px) and (max-width: 639px) {
  html {
    font-size: 15px;
  }
}

@media screen and (min-width: 640px) and (max-width: 719px) {
  html {
    font-size: 20px;
  }
}

@media screen and (min-width: 720px) and (max-width: 749px) {
  html {
    font-size: 22.5px;
  }
}

@media screen and (min-width: 750px) and (max-width: 799px) {
  html {
    font-size: 23.5px;
  }
}

@media screen and (min-width: 800px) and (max-width: 959px) {
  html {
    font-size: 25px;
  }
}

@media screen and (min-width: 960px) and (max-width: 1079px) {
  html {
    font-size: 30px;
  }
}

@media screen and (min-width: 1080px) {
  html {
    font-size: 32px;
  }
}
html,
body,
#app {
  height: 100%;
  margin: 0px;
  padding: 0px;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}

.aside-header {
  border-bottom: 1px solid #dcdfe6;
  padding: 16px 0;
  text-align: left;
}

.app-name {
  color: #409eff;
  font-weight: bolder;
  font-size: 18px;
}

.main-content {
  overflow-y: auto;
}

.my-divider {
  height: 1px;
  width: 100%;
  background-color: #dcdfe6;
  margin: 12px 0;
}

.label {
  color: #c0c4cc;
  font-size: 0.8rem;
  font-weight: 500;
}
</style>
